package model.document;

import model.tampon.Stackable;

public class Ligne implements Stackable {
	private Texte texteParent;
	private String contenu;
	private Section sectionParente;

	public Ligne(String contenu, Texte texte){
		this.texteParent = texte;
		this.contenu = contenu;
	}
	
	public Ligne(String contenu, Section section){
		this.sectionParente = section;
		this.contenu = contenu;
	}

	public String getContenu() {
		return contenu;
	}

	public void setContenu(String contenu) {
		this.contenu = contenu;
	}

	public String toString(){
		return (this.getTexteParent() == null ? "/T\\" : "") + this.contenu + (this.getTexteParent() == null ? "" : "\n");
	}

	public int getSize() {
		return 1;
	}

	public Texte getTexteParent() {
		return texteParent;
	}

	public void setTexteParent(Texte texteParent) {
		this.texteParent = texteParent;
	}

	public Section getSectionParente() {
		return this.sectionParente;
	}

}